Skip to contentSkip to conversation

Change in openvpn[master]: Remove CMake custom compiler flags for RELEASE and DEBUG build

Openvpn-devel In review plaisthos (Code Review) 3 participants 6 messages Oct 18, 2023 – Nov 9, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1697649588000.I3ca6965799b23d542ababc3e38880317cb46a3ac@...2715...

#1 lore raw

Attention is currently required from: flichtenheld.

Hello flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/374?usp=email

to review the following change.

Change subject: Remove CMake custom compiler flags for RELEASE and DEBUG build
......................................................................

Remove CMake custom compiler flags for RELEASE and DEBUG build

This overwrites the default that cmake automatically sets. In the case of debug builds, this breaks debugging as -O1 already optimises many variables away.

Change-Id: I3ca6965799b23d542ababc3e38880317cb46a3ac
---
M CMakeLists.txt

1 file changed, 0 insertions(+), 4 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/74/374/1

CMakeLists.txt +0 -4
index 376a060..d21c9bd 100644
@@ -79,10 +79,6 @@
         add_link_options("$<$<CONFIG:Release>:/CETCOMPAT>")
     endif()
 else ()
-    set(CMAKE_C_FLAGS_RELEASE "-O2")
-    set(CMAKE_CXX_FLAGS_RELEASE "-O2")
-    set(CMAKE_C_FLAGS_DEBUG "-g -O1")
-    set(CMAKE_CXX_FLAGS_DEBUG "-g -O1")
     add_compile_options(-Wall -Wuninitialized)
     check_c_compiler_flag(-Wno-stringop-truncation NoStringOpTruncation)
 

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/374?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I3ca6965799b23d542ababc3e38880317cb46a3ac
Gerrit-Change-Number: 374
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: plaisthos.

flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/374?usp=email )

Change subject: Remove CMake custom compiler flags for RELEASE and DEBUG build
......................................................................

Patch Set 1: Code-Review+2

(1 comment)

Patchset:

PS1:
I had probably reasons for doing this, but I can't recover them anymore. I vaguely remember that the -O1 was a work-around for a mingw compiler warning. Presumably we have fixed that warning in the meantime since I can't reproduce it right now.

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/374?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I3ca6965799b23d542ababc3e38880317cb46a3ac
Gerrit-Change-Number: 374
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Comment-Date: Fri, 03 Nov 2023 14:49:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#3 lore raw

PATCH 1/1 Remove CMake custom compiler flags for RELEASE and DEBUG build

In reply to a message not in the archive

From: Arne Schwabe <[email protected]...>

This overwrites the default that cmake automatically sets. In the case of debug builds, this breaks debugging as -O1 already optimises many variables away.

Change-Id I3ca6965799b23d542ababc3e38880317cb46a3ac

---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/374
This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <[email protected]...>

CMakeLists.txt +0 -4
index 376a060..d21c9bd 100644
@@ -79,10 +79,6 @@
         add_link_options("$<$<CONFIG:Release>:/CETCOMPAT>")
     endif()
 else ()
-    set(CMAKE_C_FLAGS_RELEASE "-O2")
-    set(CMAKE_CXX_FLAGS_RELEASE "-O2")
-    set(CMAKE_C_FLAGS_DEBUG "-g -O1")
-    set(CMAKE_CXX_FLAGS_DEBUG "-g -O1")
     add_compile_options(-Wall -Wuninitialized)
     check_c_compiler_flag(-Wno-stringop-truncation NoStringOpTruncation)
 
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: Remove CMake custom compiler flags for RELEASE and DEBUG build

Your patch has been applied to the master branch.

commit 753cba211c4752ef13d810b757f1aa7dee89626b

Author: Arne Schwabe
Date:   Tue Nov 7 15:17:55 2023 +0100
     Remove CMake custom compiler flags for RELEASE and DEBUG build

     Acked-by: Frank Lichtenheld <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/search?l=mid&[email protected]...
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#2) to the change originally created by plaisthos. ( http://gerrit.openvpn.net/c/openvpn/+/374?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by flichtenheld

Change subject: Remove CMake custom compiler flags for RELEASE and DEBUG build
......................................................................

Remove CMake custom compiler flags for RELEASE and DEBUG build

This overwrites the default that cmake automatically sets. In the case of debug builds, this breaks debugging as -O1 already optimises many variables away.

Change-Id I3ca6965799b23d542ababc3e38880317cb46a3ac

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/search?l=mid&[email protected]...

---
M CMakeLists.txt

1 file changed, 0 insertions(+), 4 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/74/374/2

CMakeLists.txt +0 -4
index 376a060..d21c9bd 100644
@@ -79,10 +79,6 @@
         add_link_options("$<$<CONFIG:Release>:/CETCOMPAT>")
     endif()
 else ()
-    set(CMAKE_C_FLAGS_RELEASE "-O2")
-    set(CMAKE_CXX_FLAGS_RELEASE "-O2")
-    set(CMAKE_C_FLAGS_DEBUG "-g -O1")
-    set(CMAKE_CXX_FLAGS_DEBUG "-g -O1")
     add_compile_options(-Wall -Wuninitialized)
     check_c_compiler_flag(-Wno-stringop-truncation NoStringOpTruncation)
 

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/374?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I3ca6965799b23d542ababc3e38880317cb46a3ac
Gerrit-Change-Number: 374
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#6 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/374?usp=email )

Change subject: Remove CMake custom compiler flags for RELEASE and DEBUG build
......................................................................

Remove CMake custom compiler flags for RELEASE and DEBUG build

This overwrites the default that cmake automatically sets. In the case of debug builds, this breaks debugging as -O1 already optimises many variables away.

Change-Id I3ca6965799b23d542ababc3e38880317cb46a3ac

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/search?l=mid&[email protected]...

---
M CMakeLists.txt

1 file changed, 0 insertions(+), 4 deletions(-)
CMakeLists.txt +0 -4
index 376a060..d21c9bd 100644
@@ -79,10 +79,6 @@
         add_link_options("$<$<CONFIG:Release>:/CETCOMPAT>")
     endif()
 else ()
-    set(CMAKE_C_FLAGS_RELEASE "-O2")
-    set(CMAKE_CXX_FLAGS_RELEASE "-O2")
-    set(CMAKE_C_FLAGS_DEBUG "-g -O1")
-    set(CMAKE_CXX_FLAGS_DEBUG "-g -O1")
     add_compile_options(-Wall -Wuninitialized)
     check_c_compiler_flag(-Wno-stringop-truncation NoStringOpTruncation)
 

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/374?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I3ca6965799b23d542ababc3e38880317cb46a3ac
Gerrit-Change-Number: 374
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged